Skip to content

add the check for pidMode #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 9, 2025
Merged

add the check for pidMode #76

merged 2 commits into from
Apr 9, 2025

Conversation

y-isono
Copy link
Contributor

@y-isono y-isono commented Apr 3, 2025

If users are sharing a PID namespace in a task, they can only start ECS Exec sessions into one container.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html#ecs-exec-considerations

You can have only one ECS Exec session per process ID (PID) namespace. If you are sharing a PID namespace in a task, you can only start ECS Exec sessions into one container.

So, if pidMode is task, it would be nice exec checker could warn the mode.
related issue: #75

@y-isono
Copy link
Contributor Author

y-isono commented Apr 8, 2025

@nathanpeck -san @adamjkeller -san @maishsk -san

Could you review this PR ?

@@ -128,6 +128,8 @@ The `check-ecs-exec.sh` doesn't support checking this item for shared VPC subnet
19. **🟡 Environment Variables : defined**
SSM uses the AWS SDK which uses the [default chain](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html#credentials-default) when determining authentication. This means if AWS_ACCESS_KEY, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY are defined in the environment variables and the permissions there do not provide the required permissions for SSM to work, then the execute-command will fail. It is recomended not to define these environment variables.

20. **🟡 PidMode : task**
If you are [sharing a PID namespace in a task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#other_task_definition_params), you can only start ECS Exec sessions into one container. See the "Considerations for using ECS Exec" in [the ECS official documentation](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html#ecs-exec-considerations) for more details.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding a line break back in after line 132?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ollypom -san
Thank you for pointing it out !
I added a line after line 132 so could you please review this PR again ?
Thanks !!

@y-isono y-isono requested a review from ollypom April 9, 2025 14:11
@mergify mergify bot merged commit b31bb8c into aws-containers:main Apr 9, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants